﻿@model Weibo.Web.Models.SchoolIndexModel
           <script>
               var education = {};
               education.del = function (id) {
                   App.confirm("是否真的删除？", function () {
                       $.ajax(
                           {
                               url: "/Ajax/DelEducation",
                               datatype: "json",
                               cache: false,
                               data: { educationId: id },
                               type: "post",
                               success: function (o) {
                                   if (o.Code == "A00001") {
                                       App.showLoginDial();
                                   }
                                   else if (o.Code == "A00003") {
                                       App.alert(CodeList["A00003"]);
                                   }
                                   else {
                                       var obj = $("#" + id);
                                       
                                       obj.next().remove();
                                       obj.next().remove();
                                       obj.next().remove();
                                       obj.next().remove();
                                       obj.remove();
                                   }
                               },
                               error: function (request) {
                                   App.alert(CodeList["A00003"]);
                               }
                           });
                   });
               }
 
           </script>
<ul id="feed_list@{@(Model.Buffer == 0 ? "" : Model.Buffer.ToString())}" class="MIB_feed ulSchool" style="line-height: 15px;">
    <div class="JoinedClass">
        <strong>已加入的班级</strong>
    </div>
    @{
        if (Model.EducationList != null)
        {
            foreach (Education m in Model.EducationList)
            {
                if (m != null)
                {

        <li id="@m.ID">
            <p class="sms">
                <a title="@m.SchoolClassName"  href="javascript:void(0)" class="aSchoolName">@m.SchoolClassName
                </a><a style="float: right;" href="javascript:void(0)" onclick="education.del(@m.ID);return false;">退出班级</a>
            </p>
        </li>
        <li><span class="spanGray">班级属性</span><div class="MIB_linkbl" style="width: 450px;
            float: right;">
            <a href="javascript:void(0)">@m.SchoolName @m.StartDate @m.schoolCollege</a>
        </div>
        </li>
        <li><span class="spanGray">学历</span><div class="MIB_linkbl" style="width: 450px;
            float: right;">
            <a href="javascript:void(0)">@m.TypeName</a>
        </div>
        </li>
        <li><span class="spanGray">创建人</span><div class="MIB_linkbl" style="width: 450px;
            float: right;">
            <a href="javascript:void(0)">@m.CreateUserName</a>
        </div>
        </li>

        <li><span class="spanGray">成员</span><div class="MIB_linkbl" style="width: 450px;
            float: right;">
            <a>@m.ClassTotalNum 人</a> <a href="#!/@m.UID/School?IsHaveMember=1&gid=@m.SchoolClassID">查看全部成员</a>
        </div>
        </li>
        <br />
                }

            }
        }
    }
    @{
        if (Model.NotAuditEducationList != null)
        {
        
        <div class="JoinedClass">
            <strong>正在审核中的班级</strong>
        </div>
            foreach (Education m in Model.NotAuditEducationList)
            {
                if (m != null)
                {

        <li>
            <p class="sms">
                <a title="@m.SchoolClassName"  href="javascript:void(0)"  >@m.SchoolClassName
                </a><a style="float: right;" href="javascript:void(0)">取消创建</a>
            </p>
        </li>
        <li><span class="spanGray">班级属性</span><div class="MIB_linkbl" style="width: 450px;
            float: right;">
            <a href="javascript:void(0)">@m.SchoolName @m.StartDate @m.schoolCollege</a>
        </div>
        </li>
        <li><span class="spanGray">学历</span><div class="MIB_linkbl" style="width: 450px;
            float: right;">
            <a href="javascript:void(0)">@m.TypeName</a>
        </div>
        </li>
        <li><span class="spanGray">创建人</span><div class="MIB_linkbl" style="width: 450px;
            float: right;">
            <a href="javascript:void(0)">@m.CreateUserName</a>
        </div>
        </li>

                }

            }
        }
    }
</ul>
